Last updated on 12/14/99

ProfileDesigner Widget

/widgets/ProfileBldrHTC/ProfileDesigner.htc

The ProfileDesigner widget is a UI component designed specifically for creating and manipulating XML profile documents. The HTC is designed to be well-encapsulated so that it can be embedded into any page that needs the ability to work with the XML profile format, and can support either normal profiles or site-term profiles.

Loading profile designer, please wait.

events

onChange
Fires anytime the profile XML document is changed by the user.

event object properties

none

onStatus
Fires anytime the Profile-Designer needs to report a change in the status of the profile. The event contains the status message.

event object properties

window.event.statusText String. Contains the status message.

methods

divProfDesigner.Refresh()
Causes the Profile-Designer to resync its UI from the current state of the actual profile in the XML data-island.

parameters

none

return value

none

remarks

This method is provided for situations where the underlying profile data in the XML data-island is changed, but not by the Profile-Designer. (For example, in the Profile-Editor BizDesk module-page, when the user hits the "save" button, the module-page uses the Microsoft.XMLHTTP object to POST the current XML to the server, and then retrieves the new, latest XML from the server. Since the data has changed, the Profile-Designer has to be resync'd with it.

bApply = divProfDesigner.DoApply()
Checks if there are changes to be applied. If there are, it asks the user if they want to apply changes, then applies or discards them as appropriate.

parameters

none

return value

bApply (Boolean) Returns false only if user chooses Cancel or the changes could not be applied, true otherwise.

remarks

Used before saving the profile. Changes will either be applied or discarded, or the function will return false. In this case, the profile should not be saved.

bValid = divProfDesigner.CheckValid()
Checks for all required profile elements and invalid profile states.

parameters

none

return value

bValid (Boolean) Returns true if the profile is valid, false otherwise.

remarks

Used before saving the profile. If return value is false, the profile should not be saved. Detailed information will be displayed to the user during function execution about errors in the profile. This function should not be used for site terms profiles.
A valid profile has the following conditions:

  1. Exactly one member has been defined as the primary key.
  2. Exactly one member has been defined as the join key.
  3. Exactly one member has been defined as the hashing key (for partitioned sources).
  4. Exactly one member has been defined as the RDN attribute (for LDAP sources).
  5. Exactly one property exists named 'date_last_changed' (for exported profiles).
  6. Primary and join keys are mapped to data (for non-cached profiles).

container attributes (set on element)

ConfigXML ID of an XML data-island from which the Profile-Designer can load its configuration information.

scriptable properties

bValue = divProfileDesigner.isDirty
divProfileDesigner.isDirty = bValue
Read-write. This flag is set to true anytime the user modifies the profile using the Profile-Designer HTC, but can be externally reset to false by code outside the Profile-Designer.

Configuration XML

KEY:     <NodeTag>     <RepeatingNodeTag*>     @attribute

sample

<XML ID='xmlisPDConfig'>
  <profiledesigner docid='xmlisProfileData' sitetermsid='xmlisSiteTermsData' catalogid='xmlisCatalogData'>
    <helppath>http://localhost/bizdesk</helppath>
  </profiledesigner>
</XML>